﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_PROD_WORKCENTERS_PERSON
// * CreateDate    : 2013-02-19 16:54:04
// * Creater       : CodeSmith
// * LastChangeDate: 2013-02-19 16:54:04
// * LastChanger   : 2013-02-19 16:54:04
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class ProdWorkcentersPersonEntity : EntityBase
    {
        public ProdWorkcentersPersonTable TableSchema
        {
            get
            {
                return ProdWorkcentersPersonTable.Current;
            }
        }

        public ProdWorkcentersPersonEntity()
        {

        }

        public ProdWorkcentersPersonEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.WorkcentersCode = Convert.ToString(CommonFunctions.ToObject(dr["WORKCENTERS_CODE"]));
            this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
            this.PersonName = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_NAME"]));
            this.PersonCode = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_CODE"]));
        }

        public ProdWorkcentersPersonEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.WorkcentersCode = Convert.ToString(CommonFunctions.ToObject(dr["WORKCENTERS_CODE"]));
            this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
            this.PersonName = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_NAME"]));
            this.PersonCode = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_CODE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return ProdWorkcentersPersonTable.Current;
            }
        }

        #region Perporty List
        public string WorkcentersCode
        {
            get { return Convert.ToString(GetData(ProdWorkcentersPersonTable.C_WORKCENTERS_CODE)); }
            set { SetData(ProdWorkcentersPersonTable.C_WORKCENTERS_CODE, value); }
        }

        public string PersonId
        {
            get { return Convert.ToString(GetData(ProdWorkcentersPersonTable.C_PERSON_ID)); }
            set { SetData(ProdWorkcentersPersonTable.C_PERSON_ID, value); }
        }

        public string PersonName
        {
            get { return Convert.ToString(GetData(ProdWorkcentersPersonTable.C_PERSON_NAME)); }
            set { SetData(ProdWorkcentersPersonTable.C_PERSON_NAME, value); }
        }

        public string PersonCode
        {
            get { return Convert.ToString(GetData(ProdWorkcentersPersonTable.C_PERSON_CODE)); }
            set { SetData(ProdWorkcentersPersonTable.C_PERSON_CODE, value); }
        }

        #endregion
    }


}

